import request from '@/utils/request'
export function getNews (id) {
  return request({
    url: '/api/Common/News/GetNews',
    method: 'get',
    params: { id }
  })
}

export function getNewses (params) {
  return request({
    url: '/api/Common/News/GetNewses',
    method: 'get',
    params
  })
}

export function getUsingNewses (params) {
  return request({
    url: '/api/Common/News/GetUsingNewses',
    method: 'get',
    params
  })
}

export function addNews (data) {
  return request({
    url: '/api/Common/News/AddNews',
    method: 'post',
    data
  })
}

export function editNews (data) {
  return request({
    url: '/api/Common/News/EditNews',
    method: 'post',
    data
  })
}

export function deleteNews (id) {
  return request({
    url: '/api/Common/News/DeleteNews',
    method: 'get',
    params: { id }
  })
}

export function displayOrNot (id, isDisplay) {
  return request({
    url: '/api/Common/News/DisplayOrNot',
    method: 'get',
    params: { id, isDisplay }
  })
}

